package edu.mit.media.fv.aqview
{
	import flash.display.MovieClip;
	import edu.mit.media.fv.blocks.*;
	import edu.mit.media.fv.components.*;
	import edu.mit.media.fv.events.*;
	import edu.mit.media.fv.fluidspace.*;
	import edu.mit.media.fv.icons.*;
	
	import edu.mit.media.fv.aqwidgets.*;
	
	import flash.display.*;
	import flash.events.*;
	import flash.text.*;
	
	public class AQMessageViewer extends AQViewer
	{
		public function AQMessageViewer()
		{
			super();
			FluidEventHandler.addEventListener(WidgetEvent.DISPLAY_MESSAGE_BUILDER, displayWidget);
		}
		public function displayWidget(event:WidgetEvent = null):void{
			FluidEventHandler.dispatchEvent(new WidgetEvent(WidgetEvent.DISPLAY_WIDGET, this, "Message"));
		}
		private function textListener(event:MouseEvent):void{
			FluidEventHandler.dispatchEvent(new WidgetEvent(
				WidgetEvent.DISPLAY_TEXT_BUILDER));
		}
		private function voiceListener(event:MouseEvent):void{
			FluidEventHandler.dispatchEvent(new WidgetEvent(
				WidgetEvent.DISPLAY_VOICE_BUILDER));
		}
		private function shoppingListener(event:MouseEvent):void{
			FluidEventHandler.dispatchEvent(new WidgetEvent(
				WidgetEvent.DISPLAY_SHOPPING_BUILDER));
		}
		private function IMListener(event:MouseEvent):void{
			FluidEventHandler.dispatchEvent(new WidgetEvent(
				WidgetEvent.DISPLAY_IM_BUILDER));
		}
		private function pollListener(event:MouseEvent):void{
			FluidEventHandler.dispatchEvent(new WidgetEvent(
				WidgetEvent.DISPLAY_POLL_BUILDER));
		}
		private function pixListener(event:MouseEvent):void{
			FluidEventHandler.dispatchEvent(new WidgetEvent(
				WidgetEvent.DISPLAY_PIX_BUILDER));
		}
		
	}
}